require(["./config"], () => {
  require([
    "template",
    "request",
    "header",
    "footer",
    "bootstrap",
    "ddb",
    "land",
    "jquery",
  ], (tmp, req) => {
    class Lib {
      constructor() {
        this.init();
      }
      init() {
        // console.log(location);
        const id = window.location.search.split("=")[1];
        // console.log(id);
        this.getLlbDate(id);
      }

      // 获取列表页数据
      getLlbDate(id) {
        req.getListsugar4(id).then((res) => {
          // console.log(res);

          if (res.code === 200) {
            this.renderllb(res.data.items);
          }
        });
      }
      // 渲染列表页
      renderllb(obj) {
        const { list } = obj;
        const html = tmp("template_llb", { list });
        $(".tmp_llb").html(html);
      }

      
    }
    return new Lib();
  });
});
